home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Speccy ClassiX 1998
/
Speccy ClassiX 98.iso
/
amiga_system
/
the_aminet
/
util
/
libs
/
halt.lzh
/
halt
/
halt_inline.h
next >
Wrap
C/C++ Source or Header
|
1995-10-06
|
2KB
|
98 lines
#ifndef _INLINE_HALT_H
#define _INLINE_HALT_H
#include <sys/cdefs.h>
#include <inline/stubs.h>
__BEGIN_DECLS
#ifndef BASE_EXT_DECL
#define BASE_EXT_DECL
#define BASE_EXT_DECL0 extern struct Library * HaltBase;
#endif
#ifndef BASE_PAR_DECL
#define BASE_PAR_DECL
#define BASE_PAR_DECL0 void
#endif
#ifndef BASE_NAME
#define BASE_NAME HaltBase
#endif
BASE_EXT_DECL0
static __inline int
Reboot (BASE_PAR_DECL int flags)
{
BASE_EXT_DECL
register int _res __asm("d0");
register struct Library *a6 __asm("a6") = BASE_NAME;
register int d1 __asm("d1") = flags;
__asm __volatile ("jsr a6@(-0x1E)"
: "=r" (_res)
: "r" (a6), "r" (d1)
: "a0","a1","d0","d1", "memory");
return _res;
}
static __inline int
Unmount (BASE_PAR_DECL char *filesystem)
{
BASE_EXT_DECL
register int _res __asm("d0");
register struct Library *a6 __asm("a6") = BASE_NAME;
register char *d1 __asm("d1") = filesystem;
__asm __volatile ("jsr a6@(-0x24)"
: "=r" (_res)
: "r" (a6), "r" (d1)
: "a0","a1","d0","d1", "memory");
return _res;
}
static __inline int
AddShutdownPort (BASE_PAR_DECL struct MsgPort *port)
{
BASE_EXT_DECL
register int _res __asm("d0");
register struct Library *a6 __asm("a6") = BASE_NAME;
register struct MsgPort *d1 __asm("d1") = port;
__asm __volatile ("jsr a6@(-0x2A)"
: "=r" (_res)
: "r" (a6), "r" (d1)
: "a0","a1","d0","d1", "memory");
return _res;
}
static __inline int
RemShutdownPort (BASE_PAR_DECL struct MsgPort *port)
{
BASE_EXT_DECL
register int _res __asm("d0");
register struct Library *a6 __asm("a6") = BASE_NAME;
register struct MsgPort *d1 __asm("d1") = port;
__asm __volatile ("jsr a6@(-0x30)"
: "=r" (_res)
: "r" (a6), "r" (d1)
: "a0","a1","d0","d1", "memory");
return _res;
}
static __inline int
ShutdownStatus (BASE_PAR_DECL struct ShutdownMessage *sm)
{
BASE_EXT_DECL
register int _res __asm("d0");
register struct Library *a6 __asm("a6") = BASE_NAME;
register struct ShutdownMessage *d1 __asm("d1") = sm;
__asm __volatile ("jsr a6@(-0x36)"
: "=r" (_res)
: "r" (a6), "r" (d1)
: "a0","a1","d0","d1", "memory");
return _res;
}
#undef BASE_EXT_DECL
#undef BASE_EXT_DECL0
#undef BASE_PAR_DECL
#undef BASE_PAR_DECL0
#undef BASE_NAME
__END_DECLS
#endif /* INLINE_HALT_H */